import scrapy


class HttpbinSpider(scrapy.Spider):
    name = 'httpbin'
    allowed_domains = ['httpbin.org']
    # 修改成请求get接口的url
    start_urls = ['http://httpbin.org/get']

    def parse(self, response):
        # 打印httpbin返回的response
        self.logger.info(response.text)
        # 打印 response 的状态
        self.logger.info(response.status)
